Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avax with prefix #359

Merged
merged 9 commits into from
Aug 10, 2022
Merged

Avax with prefix #359

merged 9 commits into from
Aug 10, 2022

Conversation

makoto
Copy link
Member

@makoto makoto commented Aug 10, 2022

Modified version of #340 (AVAXC uses chainId in the separate PR)

0xcharchar and others added 9 commits April 23, 2022 20:16
AVAX uses bech32 for its X & P chains. A valid address format includes
the 'X-' or 'P-' ID prepended to the address. This adds a custom decoder
to strip the ID and decode the leftover address with bech32.

Change is backwards compatible with existing functionality.
The Avalanche C-Chain (AVAXC) uses the EVM addressing system. That being
said, on Avalanche, it is valid to have the chain ID prepended to the
address. This decoder does some preparsing to strip the ID and pass the
leftover address to a decoder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants